home *** CD-ROM | disk | FTP | other *** search
/ PC Home 48 / Fun Clicp Art 5000.iso / r / mbm / 00807_SU-co bt part.ls < prev    next >
Encoding:
Text File  |  1996-05-11  |  2.7 KB  |  88 lines

  1. on MouseClick maLettre
  2.   global gNumSpr, g1erSprLoc, gBoutons, gEtudAct, gEtatEtud, gPartie, gCDpath, gSujet0, gSujet1, gSurvolPrec, gListCod, gMessDef1, gMessDef2, gMessSty1, gMessSty2, gMol, gScopeCo0, gScopeCo1, gPosVideo, gPosDebP, gPosDebS0, gPosDebS1, gPosDebE, gTraduit
  3.   if maLettre = "T" then
  4.     if (gEtatEtud = " ") and (gPartie = " ") then
  5.       gBoutons(habille, g1erSprLoc + 11, "BTPVID 1")
  6.       gBoutons(habille, g1erSprLoc + 12, "BTGRWS 1")
  7.       gBoutons(habille, g1erSprLoc + 13, "BTGAVS 1")
  8.       set gMol to 0
  9.       set gPosVideo to 0
  10.       set gSujet1 to gSujet0
  11.       repeat with i = g1erSprLoc + 10 to g1erSprLoc + 13
  12.         set the visible of sprite i to 1
  13.       end repeat
  14.     else
  15.       if gPartie = "T" then
  16.         set oldNumSpr to g1erSprLoc + 9
  17.       else
  18.         if gPartie = "C" then
  19.           set oldNumSpr to g1erSprLoc + 8
  20.         else
  21.           if gPartie = "S" then
  22.             set oldNumSpr to g1erSprLoc + 7
  23.           else
  24.             if gPartie = "B" then
  25.               set oldNumSpr to g1erSprLoc + 6
  26.             else
  27.               alert("gPartie=" & gPartie)
  28.             end if
  29.           end if
  30.         end if
  31.       end if
  32.       gBoutons(relache, oldNumSpr)
  33.       gBoutons(appuie, gNumSpr)
  34.     end if
  35.     if gEtatEtud <> " " then
  36.       set gMessDef1 to getAt(gTraduit, 38)
  37.     else
  38.       set gMessDef1 to getAt(gTraduit, 61)
  39.     end if
  40.     set gEtatEtud to maLettre
  41.     set gPartie to maLettre
  42.     set gPosDebS0 to (getPos(gListCod, gSujet0(Le_Code)) - 1) * 300 * 4
  43.     set gPosDebS1 to (getPos(gListCod, gSujet1(Le_Code)) - 1) * 300 * 4
  44.     set gPosDebP to (getPos(gListPart, gPartie) - 1) * 300
  45.     gScopeCo0(Box, 20, 92, 280, 256)
  46.     gScopeCo1(Box, 20, 296, 280, 460)
  47.     gScopeCo0(SetTime, gPosDebE + gPosDebS0 + gPosDebP + gPosVideo)
  48.     gScopeCo1(SetTime, gPosDebE + gPosDebS1 + gPosDebP + gPosVideo)
  49.     gScopeCo0(visible, 1)
  50.     gScopeCo1(visible, 1)
  51.   else
  52.     gBoutons(relache, gNumSpr)
  53.     beep()
  54.   end if
  55.   set gSurvolPrec to -1
  56. end
  57.  
  58. on mouseDown
  59.   global gNumSpr, g1erSprLoc, gBoutons
  60.   set gNumSpr to -2
  61.   repeat with i = g1erSprLoc + 6 to g1erSprLoc + 9
  62.     if rollOver(i) then
  63.       set gNumSpr to i
  64.       exit repeat
  65.     end if
  66.   end repeat
  67.   if gNumSpr > 0 then
  68.     gBoutons(appuie, gNumSpr)
  69.   end if
  70. end
  71.  
  72. on mouseUp
  73.   global gNumSpr, g1erSprLoc, gBoutons, gEtudAct, gEtatEtud, gPartie, gCDpath, gSujet0, gSujet1, exitFrame, gSurvolPrec, gMessDef1, gMessDef2, gMessSty1, gMessSty2, gSprVideo1
  74.   curseur(1)
  75.   set monNumSpr to -2
  76.   repeat with i = g1erSprLoc + 6 to g1erSprLoc + 9
  77.     if rollOver(i) then
  78.       set monNumSpr to i
  79.       exit repeat
  80.     end if
  81.   end repeat
  82.   if (monNumSpr = gNumSpr) and (monNumSpr > 0) then
  83.     MouseClick(char 3 of the name of cast the castNum of sprite gNumSpr)
  84.   else
  85.     pass()
  86.   end if
  87. end
  88.